#!/bin/bash
#shurenyun get token
. ./config.cfg
set -x 


tokenjson=$(curl -X POST --header "Content-Type: application/json" --header "Accept: application/json" -d "{
    \"name\": \"${SRY_USER}\",
    \"password\": \"${SRY_PASS}\"
}" "$BASE_URL/api/v3/auth"| python -m json.tool | grep token)


TOKEN=`echo $tokenjson|cut -d "\\"" -f4`



echo $TOKEN   
